package cn.getech.data.development.mapper;

import cn.getech.data.development.entity.UploadVersionConnectResultLog;
import cn.getech.data.development.model.dto.UploadVersionConnectResultLogDto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 上传版本包记录 Mapper 接口
 * </p>
 *
 * @author hujz
 * @since 2020-07-03
 */
@Mapper
public interface UploadVersionConnectResultLogMapper extends BaseMapper<UploadVersionConnectResultLog> {

    void insertBatch(@Param("uploadVersionConnectResultLogDtos") List<UploadVersionConnectResultLogDto> uploadVersionConnectResultLogDtos);

    void updateIsExitById(@Param("id") Long id,
                            @Param("isExit") Integer isExit);

    void updateStatusByName(@Param("uploadVersionLogId") Long uploadVersionLogId,
                            @Param("olderId") Integer olderId,
                            @Param("name") String name,
                            @Param("importStatus") Integer importStatus,
                            @Param("restList") String restList);

    void updateStatusAndIdByName(@Param("uploadVersionLogId") Long uploadVersionLogId,
                            @Param("olderId") Integer olderId,
                            @Param("name") String name,
                            @Param("importStatus") Integer importStatus,
                            @Param("newConnectDataId") Integer newConnectDataId,
                            @Param("restList") String restList);

    void updateStatusAndMsgById(@Param("id") Long id,
                                @Param("importStatus") Integer importStatus,
                                @Param("msgList") String msgList);
}
